}
static GList *
-find_next_candidate (GList *local,
- GList *global)
+find_next_candidate (GList *local,
+ GList *global,
+ gboolean ascending)
{
if (local && global)
{
global_data = global->data;
if (local_data->priority < global_data->priority)
- return local;
+ return (ascending) ? local : global;
else
- return global;
+ return (ascending) ? global : local;
}
else if (local)
return local;
if (priv->screen)
global_list = g_object_get_qdata (G_OBJECT (priv->screen), provider_list_quark);
- while ((elem = find_next_candidate (list, global_list)) != NULL)
+ while ((elem = find_next_candidate (list, global_list, TRUE)) != NULL)
{
GtkStyleProviderData *data;
GtkStyleProperties *provider_style;
global_list = g_list_last (global_list);
}
- while ((elem = find_next_candidate (list, global_list)) != NULL)
+ while ((elem = find_next_candidate (list, global_list, FALSE)) != NULL)
{
GtkIconFactory *factory;
GtkStyleProviderData *data;
list = priv->providers_last;
global = global_list;
- while ((elem = find_next_candidate (list, global)) != NULL)
+ while ((elem = find_next_candidate (list, global, FALSE)) != NULL)
{
GtkStyleProviderData *provider_data;